package com.ccb.lms.dao;

import java.sql.SQLException;
import java.util.List;

import com.ccb.lms.model.Appoint;
import com.ccb.lms.util.BasePage;

public interface IAppointDAO {

	/**
	 * 增加一条记录
	 * @param appoint
	 * @return
	 * @throws SQLException
	 */
	public boolean insertAppoint(Appoint appoint) throws SQLException;   
	
	/**
	 * 删除一条记录
	 * @param appointNO
	 * @return
	 * @throws SQLException
	 */
	public boolean deleteAppoint(Integer appointNO) throws SQLException;
	
	/**
	 * 更新一条记录
	 * @param appoint
	 * @return
	 * @throws SQLException
	 */
	public boolean updateAppoint(Appoint appoint) throws SQLException;   
	
	/**
	 * 查询所有appoint记录
	 * @return
	 * @throws SQLException
	 */
	public List<Appoint> getAllAppoints() throws SQLException; 
	
	/**
	 * 根据appointNO查询appoint
	 * @param appointNO
	 * @return
	 * @throws SQLException
	 */
	public Appoint getAppointByNO(Integer appointNO) throws SQLException;
	
	/**获取记录条目数
	 * 
	 * @return
	 * @throws SQLException
	 */
	public int getAppointCount() throws SQLException;
	
	/**
	 * 获得页面信息
	 * @param currentPage
	 * @param showRecordNum
	 * @return
	 * @throws SQLException
	 */
	public BasePage getBasePage(int currentPage,int showRecordNum) throws SQLException;
	
	/**
	 * 根据页面确定要显示的记录
	 * @param basePage
	 * @return
	 * @throws SQLException
	 */
	public List<Appoint> getAppointByPage(BasePage basePage) throws SQLException;
}
